<?php
class UCConfStore
{
	public static $storelog_recent_user_max = 50;	
	public static $storelog_recent_app_max = 50;
	public static $panel_app_max = 100;
	public static $panel_psize = 18;
	public static $def_appid_account = 1;		//账户的默认id
	public static $iframe_redirect_key = 'fdsa#$@$fdsafasf(UIjwrqe';
}

/**
* 提供统一的DB配置
* @param string $tagname DB的标识符
*/
function store2dbconfig($tagname,$key){

	$user        = null;
    $pass        = null;
    $port        = null;
    $table       = null;
    $table_alias = null;
	if(__UC_ENV=='DEV'){
		if($tagname=='apppanel_panellist'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_apppanel',
				'table' => ' t_apppanel_panellist'
			);
		}else if($tagname=='appstore_depository'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_appstore',
				'table' => ' t_appstore_repository'
			);
		}else if($tagname=='appstore_config'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_appstore',
				'table' => ' t_appstore_config'
			);
		}else if($tagname=='applog_recentuser'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_applog',
				'table' => 't_applog_recentuser'
			);
		}else if($tagname=='applog_recentapp'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_applog',
				'table' => 't_applog_recentapp'
			);
		}else if($tagname=='appstore_showcase'){
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_appstore',
				'table' => 't_appstore_showcase'
			);
		}
		
	}else if(__UC_ENV=='TEST'){
		if($tagname=='apppanel_panellist'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_apppanel',
				'table' => ' t_apppanel_panellist'
			);
		}else if($tagname=='appstore_depository'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_appstore',
				'table' => ' t_appstore_repository'
			);
		}else if($tagname=='appstore_config'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_appstore',
				'table' => ' t_appstore_config'
			);
		}else if($tagname=='applog_recentuser'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_applog',
				'table' => 't_applog_recentuser'
			);
		}else if($tagname=='applog_recentapp'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_applog',
				'table' => 't_applog_recentapp'
			);
		}else if($tagname=='appstore_showcase'){
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_appstore',
				'table' => 't_appstore_showcase'
			);
		}


	}else{//online
		if($tagname=='apppanel_panellist'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_apppanel',
				'table' => ' t_apppanel_panellist'
			);
		}else if($tagname=='appstore_depository'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_appstore',
				'table' => ' t_appstore_repository'
			);
		}else if($tagname=='appstore_config'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_appstore',
				'table' => ' t_appstore_config'
			);
		}else if($tagname=='applog_recentuser'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_applog',
				'table' => 't_applog_recentuser'
			);
		}else if($tagname=='applog_recentapp'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_applog',
				'table' => 't_applog_recentapp'
			);
		}else if($tagname=='appstore_showcase'){
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_appstore',
				'table' => 't_appstore_showcase'
			);
		}
	}
}